
export const routerData = [
  {
    // 登录成功后的页面
    path: "/",
    name: "layout",
    component: () => import("@/layout/index.vue"),
    redirect: "/home",
    meta: {
      title: "layout",
      icon: "Aim",
    },
    children: [{
      path: "/home",
      name: "Home",
      component: () => import("@/views/home/index.vue"),
      meta: {
        title: "首页1",
        icon: "Promotion",
      }
    }]
  },
  {
    // 登录
    path: "/login",
    name: "Login",
    component: () => import("@/views/login/index.vue"),
    meta: {
      title: "登录",
      icon: "InfoFilled",
      hidden: true
    }
  },
  {
    path: "/404",
    name: "404",
    component: () => import("@/views/404/index.vue"),
    meta: {
      title: "404",
      icon: "Share",
      hidden: true  //true隐藏  false显示
    }
  },

  {
    path: "/screen",
    component: () => import("@/views/screen/index.vue"),
    name: "Screen",
    meta: {
      title: "数据大屏",
      icon: "StarFilled"
    }
  }
]
// 异步路由
export const asyncRouter = [{
  path: "/acl",
  name: "Acl",
  component: () => import("@/layout/index.vue"),
  meta: {
    title: "权限管理",
    icon: "StarFilled"
  },
  redirect: "/acl/permission",
  children: [
    {
      path: "/acl/user",
      name: "User",
      component: () => import("@/views/acl/user/index.vue"),
      meta: {
        title: "用户管理",
        icon: "Promotion"
      },
    }, {
      path: "/acl/role",
      name: "Role",
      component: () => import("@/views/acl/role/index.vue"),
      meta: {
        title: "角色管理",
        icon: "Promotion"
      },
    },
    {
      path: "/acl/permission",
      name: "Permission",
      component: () => import("@/views/acl/permission/index.vue"),
      meta: {
        title: "权限管理",
        icon: "Promotion"
      }
    }
  ]
},
{
  path: "/product",
  name: "Product",
  component: () => import("@/layout/index.vue"),
  meta: {
    title: "商品管理",
    icon: "StarFilled"
  },
  redirect: "/product/trademark",
  children: [
    {
      path: "/product/trademark",
      name: "Trademark",
      component: () => import("@/views/product/trademark/index.vue"),
      meta: {
        title: "品牌管理",
      }
    },
    {
      path: "/product/attr",
      name: "Attr",
      component: () => import("@/views/product/attr/index.vue"),
      meta: {
        title: "属性管理",
      }
    },
    {
      path: "/product/sku",
      name: "Sku",
      component: () => import("@/views/product/sku/index.vue"),
      meta: {
        title: "sku管理",
      }
    },
    {
      path: "/product/spu",
      name: "Spu",
      component: () => import("@/views/product/spu/index.vue"),
      meta: {
        title: "spu管理",
      }
    }
  ]
}]
// 任意路由
export const anyRouter = {
  path: "/:pathMatch(.*)*",
  redirect: "/404",
  name: "Any",
  meta: {
    title: "任意路由",
    icon: "el-icon-s-home",
    hidden: true
  }
}